<template>

  <el-form-item
    label="公司标题"
    prop="title"
  >
    <el-input
      v-model="settings.header.title"
      clearable
      placeholder="公司标题"
    />
  </el-form-item>
  <el-form-item
    label="logo"
    prop="title"
  >
    <el-upload
      :show-file-list="false"
      :on-success="(response)=>imageApi.onSuccess(response)"
      :http-request="(e)=>imageApi.onHttpRequest(e)"
    >
      <div class="d-flex avatar-uploader" style="">
        <img
          v-if="imageApi.img.src"
          :src="imageApi.img.src"
          alt="logo"
          class="avatar"
          width="160"
          height="160" />
        <el-icon v-else class="avatar-uploader-icon">
          <Plus />
        </el-icon>
      </div>
    </el-upload>
  </el-form-item>

</template>

<script setup lang="ts">
import { Plus } from "@element-plus/icons-vue";

interface Props {
  settings: any;
  imageApi: any;
}

const { settings,imageApi } = withDefaults(defineProps<Props>(), {});

</script>

<style scoped lang="scss">

</style>
